package com.cxx.autoconfigure.annontation;

import com.cxx.autoconfigure.constant.SensitizeType;
import com.cxx.autoconfigure.serializer.SensitizeSerializer;
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 加密注解
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@JacksonAnnotationsInside
@JsonSerialize(using = SensitizeSerializer.class)
public @interface SensitiveField {
    SensitizeType type() default SensitizeType.DEFAULT;
}

